package com.bwie.controller;

import com.bwie.utils.R;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

@RestController
@RequestMapping("/big/index")
public class BigDeimalController {



        @PostMapping("/round1/{a}/{b}")
        public R round1(@PathVariable("a") BigDecimal a,@PathVariable("b")Integer b){

            BigDecimal bigDecimal = a.setScale(b, BigDecimal.ROUND_UP);
            System.out.println(bigDecimal);
            return R.OK(bigDecimal);
        }

}
